/*
@ _ a1$
, 没有_ a1$

*/
#include <iostream>
// #include <sstream>
#include <string>
using namespace std;
#define DEBUG
#define pre (pos-1)
#define post (pos+1)
inline int read()
{
    int c=getchar(), f=1, x=0;
    if(c=='-') f*=-1, x=getchar();
    while(c<'0'&&'9'<c) c=getchar();
    while('0'<=c&&c<='9') 
        x=(x<<3)+(x<<1)+c-'0', c=getchar();
    return f*x;
}
inline void write(long long x)
{
    if(x>=10) write(x/10);
    putchar(x%10+'0');
}

string line;
bool ret=true;
int pos;
void init()
{
    char ch='0';
    while(ch!='\n')
    {
        ch=getchar();
        if(ch=='_')
        {
            line.push_back('_');
            while(ch=='_'&&ch!='\n') ch=getchar();
        }
        line.push_back(ch);
        if(ch=='\n') return;
    }
}

inline void debug(int pos)
{
    printf("[%d]%c [%d]%c [%d]%c [%d]%c [%d]%c\n", pre-1, pre-1>=0?line[pre-1]:'X',pre, pre>=0?line[pre]:'X', pos, line[pos], post, post<line.size()?line[post]:'X', post+1, post+1<line.size()?line[post+1]:'X');
}

inline bool isENF(int pos)
{
    return line[pos]=='a'||line[pos]=='1'||line[pos]=='$';
}

void solve()
{
    init();
    int pos=0;
    for(; pos<line.size(); pos++)
    {
        if(line[pos]=='@')
        {
            if(0<=pre)
                if(isENF(pre)) ret=false;
            if(post<line.size())
                if(isENF(post)) ret=false;
            
        }
        else if(line[pos]==',')
        {
            if(0<=pre-1)
            {
                if(line[pre-1]==',') ret=false;
                if(isENF(pre-1)&&line[pre]=='_') ret=false;
            }

            if(post+1<line.size())
            {
                if(line[post+1]==',') ret=false;
                if(isENF(post+1)&&line[post]=='_') ret=false;
            }
        }
        if(!ret) break;
    }
    printf("%s\n", ret?"Yes":"No");
    // printf("errorpos=%d\n", pos);
    
}

signed main()
{
    #ifdef DEBUG
        freopen("../in.txt", "r", stdin);
        freopen("../out.txt", "w", stdout);
    #endif

    int T=1; //cin >> T; 
    while(T--) 
    {
        solve();
    }
    return 0;
}